package vendingMachine.inventory;

public class DispenseAdapter implements IDispenseAdapter
{
  private static DispenseAdapter uniqueInstance;

  public static synchronized DispenseAdapter getInstance()
  {
    if (uniqueInstance == null)
    {
      uniqueInstance = new DispenseAdapter();
    }
    else
    {
      System.out.println("SingleExample already exists");
    }
    return uniqueInstance;
  }

  public boolean dispenseItem(int xPosition, int yPosition)
  {
    System.out.println("Dispensing the item");
    return true;
  }

  public void runDiagnostics()
  {
    System.out.println("Running diagnostics....");
  }

}
